let header = {
  'x-wps-weboffice-token': '760cf5a6df739ac8d74d7421a04c8597',
  'x-weboffice-file-id': '93324863331',
};

function request(method: string, url: string) {
  let http = new XMLHttpRequest();
  http.open(method, url);
  http.setRequestHeader('User-Agent', 'wps-weboffice-openplatform	');
  http.setRequestHeader(
    'x-wps-weboffice-token',
    header['x-wps-weboffice-token']
  );
  http.setRequestHeader('x-weboffice-file-id', header['x-weboffice-file-id']);

  http.onload = (data) => {
    console.log('data', data);
  };
  http.onerror = (err) => {
    console.log('err', err);
  };
  http.send();
}

export { request };
